<div class="container">
    <div class="row">
        <div class="row banner">
            <h2>You would like these movies</h2>
            <span class="banner-description">We recommend these movies</span>
        </div>
        <div class="row">
            <div class="col-md-2" ng-repeat="movie in movieRecByGenres">
                <div class="thumbnail">
                    <img class="hall-img" ng-src="{{movie.posterUrl}}">

                    <div class="caption">
                        <h4 ng-bind="movie.title"></h4>

                        Rating:
                        <star star-count="{{movie.avgRating}}"></star>
                        <p>
                            <button class="rate-btn btn btn-success btn-block" data-toggle="modal"
                                    data-target="#rateModal" ng-click="setMovie(movie.movieId)">Let me rate
                            </button>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="row banner">
            <h2>The highest rated movies</h2>
            <span class="banner-description">Everyone loves these movies</span>
        </div>
        <div class="row">
            <div class="col-md-2" ng-repeat="movie in movieRateHighest">
                <div class="thumbnail">
                    <img ng-src="{{movie.posterUrl}}">

                    <div class="caption">
                        <h4 ng-bind="movie.title"></h4>

                        Rating:
                        <star star-count="{{movie.avgRating}}"></star>

                        <p>
                            <button class="rate-btn btn btn-success btn-block">Let me rate</button>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="rateModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    Rate this movie
                </h4>
            </div>
            <div class="modal-body">
                <select ng-model="rating" ng-options="t.name for t in rateMap track by t.value"
                        class="form-control">
                    <option value="">--- Rate this movie ---</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary" ng-click="rate()">Submit</button>
            </div>
        </div>
    </div>
</div>